<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Component 组件props 属性设置</title>
  <script src="../assets/js/vue.js"></script>
</head>

<body>
  <h1>Component-2</h1>
  <hr>
  <div id="app">
    <panda v-bind:here="message"></panda>
  </div>
  <script type="text/javascript">
    var app = new Vue({
      el: '#app',
      data:{
        message:"China"
      },
      components: {
        'panda': {
          template: `
          <div style="color: green;">Panda from {{here}}</div>
          `,
          props:["here"]
        }
      }
    })
  </script>
</body>

</html>